<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>本站接口_go_golang</title>
    <meta name="keywords" content="go,golang,go语言,go教程,go学习"/>
    <meta name="description" content="最通俗易懂且全面的go，golang语言学习教程，和我一起学习go语言开发"/>
    <link rel="stylesheet" type="text/css" href="/assets/auicss/aui.css?v=1" />
    <link rel="stylesheet" href="/assets/css/normalize.css">
    <link rel="stylesheet" href="/assets/css/main.css">
    <style>
        .c{width: 1200px; margin: 0 auto;}
        .c_left{width: 900px; float: left;}
        .c_right{width: 300px; float: right;}
        .footer{clear: both; width: 100%}
        .aui-list{border-top: 0;}
        .main-nav .active{color: #ff7400;}
        .aui-card-list-footer span{font-size: 14px;}
        .aui-card-list-content, .aui-card-list-content-padded{line-height: 30px;}
        .aui-card-list-content-padded{padding: 0 0.75rem; text-indent: 35px;}
        .aui-card-list-header, .aui-card-list-footer{padding: 0 0.75rem; min-height: 2rem;}
        .aui-card-list a{display: block;}
        .aui-card-list a:hover,  a.aui-list-item:hover{background-color: #f0fafb; cursor: pointer;}
        a.aui-list-item{display: block; color: #212121}
        .aui-list .aui-ellipsis-2{display:-webkit-box; font-size: 14px;}
        .aui-card-list-footer .lj{background: none; display: block;}
        .aui-card-list-footer .lj:hover{background: none;}
        .js p{color: #212121;}
        .aui-list-item-title span{margin-right: 10px;}
        .tj{width: 100%; margin-right: 19px; cursor: pointer;}
    </style>
</head>
<body>
<!-- header -->
<?php
include_once 'inc_nav.php';
?>
<div class="header-placeholder"></div>
<div class="c">
    <div class="c_left aui-margin-t-15 aui-margin-b-15">
        <div class="aui-card-list">
            <div class="aui-card-list-content-padded aui-padded-15 js">
                <p>本站为技术兴趣爱好者提供内容发布与管理接口，通过接口你可以把你的技术文章推送到本站对外展示，用户可以通过点击文章链接到达你的博客或公众号文章详情页，实现客户导流。</p>
                <p>感兴趣的朋友可以在右边填写一个简单的申请表单，我这边会为你生成一个token，发到你的邮箱里，通过token就可以访问本站接口了。</p>
                <p>希望大家可以共同维护良好的网络环境，多多分享积极向上的技术文章。</p>
            </div>
        </div>

        <section class="aui-content">
            <ul class="aui-list aui-collapse aui-border aui-margin-b-15">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header aui-active" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">添加文章：<span class="aui-btn aui-btn-primary">post</span> &nbsp;&nbsp; https://www.zhoukezhang.com/api/add?token=</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-show aui-border-b">
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数1： <span>title</span>（必填）&nbsp;&nbsp; 说明：文章标题</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数2： <span>cid</span>（必填）&nbsp;&nbsp; 说明：文章分类&nbsp; 1 go学习 | 2 编程 | 3 代码 | 4 框架 | 5 项目</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数3： <span>content</span>（必填）&nbsp;&nbsp; 说明：文章简介，建议三百字以内</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数4： <span>author</span>（必填）&nbsp;&nbsp; 说明：作者</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数5： <span>author_wx</span>（可为空）&nbsp;&nbsp; 说明：作者微信，可填公众号</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数6： <span>tid</span>（可为空）&nbsp;&nbsp; 说明：来源&nbsp; 1 公众号 | 2 CSDN | 3 简书 | 4 掘金 | 5 博客园</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数7： <span>url</span>（可为空）&nbsp;&nbsp; 说明：文章链接，绝对路径的URL</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数8： <span>code</span>（可为空）&nbsp;&nbsp; 说明：分享code时候的代码</div>
                            </div>
                        </li>
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-border-b aui-show">
                        示例：
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-show">
                        返回：
                    </div>
                </div>
            </ul>

            <ul class="aui-list aui-collapse aui-border aui-margin-b-15">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header aui-active" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">修改文章：<span class="aui-btn aui-btn-primary">post</span> &nbsp;&nbsp; https://www.zhoukezhang.com/api/edit?token=</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-show aui-border-b">
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数1： <span>article_id</span>（必填）&nbsp;&nbsp; 说明：文章ID，文章添加成功本站返回的文章 article_id</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数2： <span>title</span>（必填）&nbsp;&nbsp; 说明：文章标题</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数3： <span>cid</span>（必填）&nbsp;&nbsp; 说明：文章分类&nbsp; 1 go学习 | 2 编程 | 3 代码 | 4 框架 | 5 项目</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数4： <span>content</span>（必填）&nbsp;&nbsp; 说明：文章简介，建议三百字以内</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数5： <span>author</span>（必填）&nbsp;&nbsp; 说明：作者</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数6： <span>author_wx</span>（可为空）&nbsp;&nbsp; 说明：作者微信，可填公众号</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数7： <span>tid</span>（可为空）&nbsp;&nbsp; 说明：来源&nbsp; 1 公众号 | 2 CSDN | 3 简书 | 4 掘金 | 5 博客园</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数8： <span>url</span>（可为空）&nbsp;&nbsp; 说明：文章链接，绝对路径的URL</div>
                            </div>
                        </li>
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数9： <span>code</span>（可为空）&nbsp;&nbsp; 说明：分享code时候的代码</div>
                            </div>
                        </li>
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-border-b aui-show">
                        示例：
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-show">
                        返回：
                    </div>
                </div>
            </ul>

            <ul class="aui-list aui-collapse aui-border">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header aui-active" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">删除文章：<span class="aui-btn aui-btn-primary">post</span> &nbsp;&nbsp; https://www.zhoukezhang.com/api/del?token=</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-show aui-border-b">
                        <li class="aui-list-item">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">参数1： <span>article_id</span>（必填）&nbsp;&nbsp; 说明：文章ID，文章添加成功本站返回的文章 article_id</div>
                            </div>
                        </li>
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-border-b aui-show">
                        示例：
                    </div>
                    <div class="aui-collapse-content aui-padded-15 aui-show">
                        返回：
                    </div>
                </div>

            </ul>
        </section>



    </div>

    <div class="c_right">
        <div class="aui-content-padded aui-margin-b-15">
            <form id="form_ajax" name="form_ajax" action="<?php echo site_url('home/sq')?>" method="post">
                <ul class="aui-list aui-form-list">
                    <li class="aui-list-header">申请token</li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label-icon">
                                <i class="aui-iconfont aui-icon-my"></i>
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" name="name" placeholder="姓名">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label-icon">
                                <i class="aui-iconfont aui-icon-mobile"></i>
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" name="mobile" placeholder="电话">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label-icon">
                                <i class="aui-iconfont aui-icon-mail"></i>
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" name="email" placeholder="邮箱">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label-icon">
                                <i class="aui-iconfont aui-icon-wechat"></i>
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" name="wx" placeholder="个人微信">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-input">
                                <textarea name="content" placeholder="随便说上两句什么..."></textarea>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div onclick="post_form();" class="aui-btn aui-btn-primary tj">提交申请</div>
                        </div>
                    </li>
                </ul>
            </form>
        </div>
    </div>
</div>
<?php
view_include('home/inc_foot');
?>
<script>
    function post_form(){
        $.post(
            '<?php echo base_url('home/sq')?>',
            $( "#form_ajax" ).serialize(),
            function( data ) {
                if(data){
                    if(data.status == 1){
                        alert(data.info);
                    }else {
                        alert(data.info);
                    }
                }
                toast.hide();
            },
            'json'
        );
    }
</script>
</body>
</html>